package com.dr.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dr.mapper.RegistMapper;
import com.dr.pojo.Regist;
import com.dr.service.RegistService;

@Service
@Transactional //激活事务处理
public class RegistServiceImpl implements RegistService {

	@Autowired
	private RegistMapper mapper;

	@Override
	public String nextCaseNumber() {
		// TODO Auto-generated method stub
		return mapper.nextCaseNumber();
	}

	@Override
	public Regist findRegistByCaseNumber(String caseNumber) {
		// TODO Auto-generated method stub
		return mapper.findRegistByCaseNumber(caseNumber);
	}

	@Override
	public int insertRegist(Regist regist) {
		// TODO Auto-generated method stub
		return mapper.insertRegist(regist);
	}
	
	
}
